package com.demo.service.impl;

import com.demo.dao.IAuthDao;
import com.demo.entity.User;
import com.demo.service.IAuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * Created by liushaokang on 2017/3/14.
 */

@Service
public class AuthServiceImpl implements IAuthService {

    @Autowired
    private IAuthDao authDao;

    public User getByUsername(String username) {
        return authDao.getByUsername(username);
    }

    public Set<String> getRoles(String username) {
        return authDao.getRoles(username);
    }

    public Set<String> getPermissions(String username) {
        return authDao.getPermissions(username);
    }
}
